@extends('layouts.default') @section('main')
    <link rel="stylesheet" href="/css/uniform.css" />
    <link rel="stylesheet" href="/css/select2.css" />
    <div id="content">
        <div id="content-header">
            <div id="breadcrumb">
                <a href="{{url('home')}}" title="返回首页" class="tip-bottom"><i class="icon-home"></i> 首页</a>
                <a href="#" class="tip-bottom">游戏管理</a>
                <a href="#" class="current">获奖者列表</a>
            </div>
        </div>
        <div class="container-fluid">
            <div class="row-fluid">
                <div class="span12">
                    {{--<a href="{{url('gamegoods/create')}}"><button class="btn">新增</button></a>--}}
                    <form action="{{url('gamewinners/search')}}" method="post">
                        <table>
                            <tr>
                                <th>
                                    <label >活动主题 :</label>
                                </th>
                                <th>
                                    <div class="controls">
                                        <input type="text" class="span11" name="subject"  placeholder="活动主题" />
                                    </div>
                                </th>

                                <th>
                                    <label >游戏名称 :</label>
                                </th>
                                <th>
                                    <div class="controls">
                                        <input type="text" class="span11" name="game_name"  placeholder="游戏名称" />
                                    </div>
                                </th>

                                <th>
                                    <input type="hidden" name="_token" value="{{ csrf_token() }}">
                                    <div class="controls">
                                        <button type="submit" class="btn btn-info">查询</button>
                                    </div>
                                </th>
                            </tr>
                        </table>
                    </form>

                    <div class="widget-box">
                        <div class="widget-title"> <span class="icon"><i class="icon-th"></i></span>
                            <h5>获奖者管理管理</h5>
                        </div>
                        <div class="widget-content nopadding">
                            <table class="table table-bordered table-striped">
                                <thead>
                                <tr>
                                    <th>活动主题</th>
                                    <th>游戏名称</th>
                                    <th>游戏类型</th>
                                    <th>奖品类型</th>
                                    <th>奖品名称</th>
                                    <th>获奖者uid</th>
                                    <th>姓名（邮寄用）</th>
                                    <th>电话（邮寄用）</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                @foreach($lists as $key => $list)
                                    <tr class="gradeX">
                                        <td title="">{{cut_str($list->prize->game->activity->subject,15)}}</td>
                                        <td>{{$list->prize->game->title}}</td>
                                        <td>{{$list->prize->game->type->name}}</td>
                                        <td>@if(0==$list->prize->type) 特等奖 @elseif(1==$list->prize->type) 一等奖@elseif(2==$list->prize->type) 二等奖@elseif(3==$list->prize->type) 三等奖 @elseif(4==$list->prize->type) 普通奖 @endif</td>
                                        <td>{{$list->prize->goods->name}}</td>
                                        <td>{{$list->uid}}</td>
                                        <td>{{$list->name}}</td>
                                        <td>{{$list->tel}}</td>
                                        <td class="center">
                                            @if(in_array('edit',$actions))<a data-original-title="编辑" class="tip" href="{{url('gamegoods/edit?id='.$list->id)}}"><i class="icon-pencil"></i></a> @endif
                                        </td>
                                    </tr>
                                @endforeach
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <?php echo $lists->render();?>
                </div>
            </div>
        </div>
    </div>
    <script src="/js/matrix.tables.js"></script>
@stop
